<template>
	<view>
		<view class="nav">
			<view @click="back"> ← 返回</view>
			<view>{{ddd.name}}</view>
		</view>
		<view class="content">
			<view class="title">租赁合同</view>
			<view>房号：{{ddd.name}}</view>
			<view>合同期限：{{ddd.stime}} - {{ddd.etime}}</view>
			<view>建筑面积：101平方米</view>
			<view>单价: 1234元/平米/月</view>
			
			<view>
				<view>以下是合同条款：</view>
				<view>
					1、Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean euismod bibendum laoreet. Proin gravida dolor si
				</view>
				<view>
					2、t amet lacus accumsan et viverra justo commodo. Proin sodales pulvinar sic tempor. Sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus.
				</view>
				<view>
										3、Nam fermentum, nulla luctus pharetra vulputate, felis tellus mollis orci, sed rhoncus pronin sapien nunc accuan eget.
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	import { reactive,toRefs} from 'vue'
	export default {
		setup(){
			let data = reactive({
				ddd:'',
				back:(e)=>{
					uni.navigateBack({
						delta:1
					})
				}
			})
			return {...toRefs(data)}
		},
		onLoad: function(){
			const eventChannel = this.getOpenerEventChannel();
			eventChannel.on('ht',(datas)=>{
				this.ddd=datas
			})
		},
		onUnload:function() {
			const eventChannel = this.getOpenerEventChannel();
		      eventChannel.off('ht');
		},
	}
</script>

<style scoped lang="less">
.nav{
	padding-top: 60rpx;
	padding-bottom: 20rpx;
	background-color: #F8F8F8;
	display: flex;
	position: relative;
	justify-content: center;
	>view:first-child{
		position: absolute;
		left: 0;
		color: #168ADE;
	}
}
.title{
	text-align: center;
	margin: 50rpx 0;
}
.content{
	padding: 0 100rpx;
	>view:not(.title){
		margin: 20rpx 0;
	}
	>view:last-child{
		margin-top: 30rpx;
		font-size: 25rpx;
	}
}
</style>
